def make_chocolate(small, big, goal):
  a = goal //5
  if a>big:
    c = goal-big*5
    if small>=c:
      return c
    else:
      return -1
  else:
    b=goal-a*5
    if small>=b:
      return b
    else:
      return -1